﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Restful_Api.Migrations
{
    public partial class DateValueUpdate : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_Employees_Companies_CompanyId",
                table: "Employees");

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("5d5e5446-9726-47de-8852-d24118988304"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("5e19c884-8854-4e88-b4c7-85ef02ef8e16"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("a48c8ae6-e79c-4ce1-9c02-e775146ccc4c"));

            migrationBuilder.DeleteData(
                table: "Employees",
                keyColumn: "Id",
                keyValue: new Guid("0cb20dec-2b82-4788-8e31-cd9bb5d2ef44"));

            migrationBuilder.DeleteData(
                table: "Employees",
                keyColumn: "Id",
                keyValue: new Guid("5c97ceac-13e8-4dae-ad36-1d10ca4909ac"));

            migrationBuilder.DeleteData(
                table: "Employees",
                keyColumn: "Id",
                keyValue: new Guid("8dbc379e-9a57-4fe6-8653-30c93ec573af"));

            migrationBuilder.DeleteData(
                table: "Employees",
                keyColumn: "Id",
                keyValue: new Guid("e1505926-adb9-46e9-a974-258b679a6265"));

            migrationBuilder.InsertData(
                table: "Companies",
                columns: new[] { "Id", "Introduction", "Name" },
                values: new object[,]
                {
                    { new Guid("01734449-d08e-4447-840b-20b53b8a465c"), "微软的公司简介", "微软公司" },
                    { new Guid("3b53f4c2-d427-4006-b9bd-d77ab568f2b0"), "桃子的公司简介", "桃子" },
                    { new Guid("a423c03a-c623-46a0-8c8b-bff902285f1d"), "葡萄的公司简介", "葡萄" },
                    { new Guid("92288368-424c-4304-aa49-9604c0733b70"), "橙子的公司简介", "橙子" },
                    { new Guid("02221a93-11e2-4d00-9828-f540955a1cf5"), "香蕉的公司简介", "雪梨" },
                    { new Guid("9c3a4eb2-36b4-43ea-af42-e9b845754650"), "香蕉的公司简介", "香蕉" },
                    { new Guid("31df7d18-ee4c-4720-9b77-1c24f0c6e63d"), "Vivo的公司简介", "Vivo" },
                    { new Guid("36cfde7f-35a8-4792-98d7-147779c37d43"), "苹果的公司简介", "苹果" },
                    { new Guid("6369ab09-7f98-4d60-a8be-d4e3e12cd9c2"), "魅族的公司简介", "魅族" },
                    { new Guid("c94da200-36d9-43ce-8639-f23555503a8d"), "三星的公司简介", "三星" },
                    { new Guid("d6ebca99-b540-4c78-9f11-6079e649a665"), "小米的公司简介", "小米" },
                    { new Guid("ba097ba1-b139-4a87-9ded-b43d58231f23"), "HuaWei的公司简介", "华为" },
                    { new Guid("8d4e771d-fe72-482d-b30f-99c0f4c1bf59"), "BiliBili的公司简介", "BiliBili" },
                    { new Guid("5f0d4e0f-1e07-46e0-b551-63fc3eca24ce"), "谷歌的公司简介", "Google" },
                    { new Guid("81cc449c-3d5f-4363-a3fe-8c774bc690eb"), "oppo的公司简介", "oppo" }
                });

            migrationBuilder.InsertData(
                table: "Employees",
                columns: new[] { "Id", "CompanyId", "DateOfBirth", "EmployeeNo", "FistName", "Gender", "LastName" },
                values: new object[,]
                {
                    { new Guid("cd20655e-a363-4805-a4ce-a6cf4b4ae9a2"), new Guid("01734449-d08e-4447-840b-20b53b8a465c"), new DateTime(2020, 8, 20, 0, 0, 0, 0, DateTimeKind.Unspecified), "G003", "小", 2, "Lu" },
                    { new Guid("5183c983-e1f0-45f9-b71d-0625de98fff2"), new Guid("36cfde7f-35a8-4792-98d7-147779c37d43"), new DateTime(2020, 8, 10, 0, 0, 0, 0, DateTimeKind.Unspecified), "G003", "张", 1, "三" },
                    { new Guid("9a0e8cb8-e4c6-4fa3-ac91-3467ab4020bd"), new Guid("36cfde7f-35a8-4792-98d7-147779c37d43"), new DateTime(2020, 8, 15, 0, 0, 0, 0, DateTimeKind.Unspecified), "G003", "李", 1, "四" },
                    { new Guid("581c5b45-3ad6-4ece-b04f-247bea17e96e"), new Guid("5f0d4e0f-1e07-46e0-b551-63fc3eca24ce"), new DateTime(2020, 8, 29, 0, 0, 0, 0, DateTimeKind.Unspecified), "G003", "小", 1, "江" }
                });

            migrationBuilder.AddForeignKey(
                name: "FK_Employees_Companies_CompanyId",
                table: "Employees",
                column: "CompanyId",
                principalTable: "Companies",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_Employees_Companies_CompanyId",
                table: "Employees");

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("01734449-d08e-4447-840b-20b53b8a465c"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("02221a93-11e2-4d00-9828-f540955a1cf5"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("31df7d18-ee4c-4720-9b77-1c24f0c6e63d"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("36cfde7f-35a8-4792-98d7-147779c37d43"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("3b53f4c2-d427-4006-b9bd-d77ab568f2b0"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("5f0d4e0f-1e07-46e0-b551-63fc3eca24ce"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("6369ab09-7f98-4d60-a8be-d4e3e12cd9c2"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("81cc449c-3d5f-4363-a3fe-8c774bc690eb"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("8d4e771d-fe72-482d-b30f-99c0f4c1bf59"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("92288368-424c-4304-aa49-9604c0733b70"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("9c3a4eb2-36b4-43ea-af42-e9b845754650"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("a423c03a-c623-46a0-8c8b-bff902285f1d"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("ba097ba1-b139-4a87-9ded-b43d58231f23"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("c94da200-36d9-43ce-8639-f23555503a8d"));

            migrationBuilder.DeleteData(
                table: "Companies",
                keyColumn: "Id",
                keyValue: new Guid("d6ebca99-b540-4c78-9f11-6079e649a665"));

            migrationBuilder.DeleteData(
                table: "Employees",
                keyColumn: "Id",
                keyValue: new Guid("5183c983-e1f0-45f9-b71d-0625de98fff2"));

            migrationBuilder.DeleteData(
                table: "Employees",
                keyColumn: "Id",
                keyValue: new Guid("581c5b45-3ad6-4ece-b04f-247bea17e96e"));

            migrationBuilder.DeleteData(
                table: "Employees",
                keyColumn: "Id",
                keyValue: new Guid("9a0e8cb8-e4c6-4fa3-ac91-3467ab4020bd"));

            migrationBuilder.DeleteData(
                table: "Employees",
                keyColumn: "Id",
                keyValue: new Guid("cd20655e-a363-4805-a4ce-a6cf4b4ae9a2"));

            migrationBuilder.InsertData(
                table: "Companies",
                columns: new[] { "Id", "Introduction", "Name" },
                values: new object[,]
                {
                    { new Guid("5d5e5446-9726-47de-8852-d24118988304"), "微软的公司简介", "微软公司" },
                    { new Guid("5e19c884-8854-4e88-b4c7-85ef02ef8e16"), "谷歌的公司简介", "Google" },
                    { new Guid("a48c8ae6-e79c-4ce1-9c02-e775146ccc4c"), "BiliBili的公司简介", "BiliBili" }
                });

            migrationBuilder.InsertData(
                table: "Employees",
                columns: new[] { "Id", "CompanyId", "DateOfBirth", "EmployeeNo", "FistName", "Gender", "LastName" },
                values: new object[,]
                {
                    { new Guid("8dbc379e-9a57-4fe6-8653-30c93ec573af"), new Guid("7cad215a-131c-4d7b-9167-c9a755143425"), new DateTime(2020, 8, 10, 0, 0, 0, 0, DateTimeKind.Unspecified), "G003", "张", 1, "三" },
                    { new Guid("5c97ceac-13e8-4dae-ad36-1d10ca4909ac"), new Guid("7cad215a-131c-4d7b-9167-c9a755143425"), new DateTime(2020, 8, 15, 0, 0, 0, 0, DateTimeKind.Unspecified), "G003", "李", 1, "四" },
                    { new Guid("0cb20dec-2b82-4788-8e31-cd9bb5d2ef44"), new Guid("9e48c982-c52b-46d9-bc9c-d98da8fee770"), new DateTime(2020, 8, 20, 0, 0, 0, 0, DateTimeKind.Unspecified), "G003", "小", 2, "Lu" },
                    { new Guid("e1505926-adb9-46e9-a974-258b679a6265"), new Guid("ac83f843-9cd2-449e-a5f6-656229c617d5"), new DateTime(2020, 8, 29, 0, 0, 0, 0, DateTimeKind.Unspecified), "G003", "小", 1, "江" }
                });

            migrationBuilder.AddForeignKey(
                name: "FK_Employees_Companies_CompanyId",
                table: "Employees",
                column: "CompanyId",
                principalTable: "Companies",
                principalColumn: "Id",
                onDelete: ReferentialAction.Restrict);
        }
    }
}
